﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />


<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>

  <div class="container-fluid ihg-container">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb">
        <li class="active">MY COACHING TASKS</li>
      </ol>
      <div class="pull-right">
        <a href="${ctx.host}/coach-coaching-progress" style="color: #155CB2;font-size: 16px;"><<&nbsp;Go Back To Coachee List</a>
      </div>
    </div>
    
    <div class="row">
      <div class="clearfix">
        <div class="col-xs-8">
          <div style="width: 100%; margin-left: 10px;">
            <p style="font-weight: bold; color: #666; font-size: 20px;">INSTRUCTION</p>
            <ul class="list-unstyled instruction-list">
              <li>${delegate.name} from your team is participating in the Career Insight EXCOM Potential Virtual Development Center and has completed the assessment phase</li>
              <li>You are assigned as the delegate’s coach as ${delegate.name} proceeds in the accelerated development journey towards the next position</li>
              <li>During the following 6 – 12 months, The delegate will initiate at least 6 coaching conversations with you</li>
              <li>The coaching conversation should focus on the delegate’s development plan progress, as well as help the delegate overcome difficulties or leverage resources</li>
              <li>After each coaching conversation, the delegate is required to submit the conversation summary and the development plan (if any updates) within 2 weeks, and you will receive an email reminder to review the updates in this system</li>
              <li>You could confirm the summary, or send back for revision. You should confirm the summary only if it is prepared with meaningful effort. The delegate will not graduate from the program without 6 confirmations.</li>
            </ul>
          </div>
        </div>
        <div class="col-xs-4">
          <c:choose>
            <c:when test="${empty delegateAttributes or empty delegateAttributes['coaching-plan']}">
              <div class="pull-left" style="width: 200px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="javascript:void(0);" class="certification-item color-danger" data-target="#upload" data-toggle="modal" style="width: 176px; height: 176px; line-height: 1.2; font-size: 15px; background-color: #dea948;"> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">Development Plan Draft</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">Not Uploaded</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:when>
            <c:otherwise>
              <div class="pull-left" style="width: 200px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="${delegateAttributes['coaching-plan'].value}" class="certification-item" style="width: 176px; height: 176px; line-height: 1.2; font-size: 15px;"> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">Development Plan Draft</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">Download</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:otherwise>
          </c:choose>
          <c:choose>
            <c:when test="${empty sessionReport or empty sessionReport.managerFinalReport}">
              <div class="pull-left" style="width: 200px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="javascript:void(0);" class="certification-item color-danger" data-target="#upload" data-toggle="modal" style="width: 176px; height: 176px; line-height: 1.2; font-size: 15px; background-color: #dea948;"> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">Career Insight Report</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">Not Uploaded</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:when>
            <c:otherwise>
              <div class="pull-left" style="width: 200px;">
                <div class="certification-layout clearfix" style="margin-top: 12px;">
                  <div class="item-wrap">
                    <a href="${sessionReport.managerFinalReport}" class="certification-item" style="width: 176px; height: 176px; line-height: 1.2; font-size: 15px; "> <span class="iconfont icon-baogao" aria-hidden="true" style="font-size: 60px;"></span>
                      <p class="no-margin">Career Insight Report</p>
                      <button type="button" class="btn certification-btn" style="margin-top: 10px;">Download</button>
                    </a>
                  </div>
                </div>
              </div>
            </c:otherwise>
          </c:choose>
          
        </div>
      </div>
      
      <div class="col-xs-12">
        <div class="ihg-content-layout">
          <table class="table table-striped ihg-table tab-pane development-journey-table" style="margin-top: 15px;">
            <thead>
              <tr>
                <th>CONVERSATION</th>
                <th>CONVERSATION DATE</th>
                <th>UPDATE TIME</th>
                <th>STATUS</th>
                <th>CONVERSATION SUMMARY</th>
                <th>ACTION</th>
              </tr>
            </thead>
            <tbody>
              <c:forEach var="conversation" items="${conversations}" varStatus="status">
                <tr>
                  <td>${status.index<10 ? '0' : ''}${status.index+1}</td>
                  <td><fmt:formatDate value="${conversation.conversationDate}" pattern="yyyy/MM/dd"/></td>
                  <td><fmt:formatDate value="${conversation.lastUpdateTime}" pattern="yyyy/MM/dd HH:mm"/></td>
                  <td>
                    <label class="label label-${conversation.status.notSubmited ? 'default' : conversation.status.confirmed ? 'success' : 'danger'}" style="display: block; margin: 0 auto; width: 170px;"><fmt:message key="${conversation.status.message}" /></label>
                  </td>
                  <td><a href="${ctx.host}/coach-coaching-progress/coaching-conversations/${conversation.id}" data-target="#conversation-view" data-toggle="modal">VIEW</a></td>
                  <td>
                    <c:choose>
                      <c:when test="${conversation.status.notConfirmed}">
                        <a class="btn btn-success" style="color:#fff;" href="${ctx.host}/coach-coaching-progress/coaching-conversations/${conversation.id}/confirm" data-target="#conversation-confirm" data-toggle="modal">Confirm</a>
                        <a class="btn btn-success" style="color:#fff;" href="${ctx.host}/coach-coaching-progress/coaching-conversations/${conversation.id}/send-back" data-target="#conversation-confirm" data-toggle="modal">Send Back</a>
                      </c:when>
                      <c:otherwise>-</c:otherwise>
                    </c:choose>
                  </td>
                </tr>
              </c:forEach>
            </tbody>
          </table>
        </div>

      </div>
    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/coaching-progress-list.js" />
  <script type="text/javascript">
    require([ 'page/session/coaching-progress-list' ], function(page) {
      page.init();
    })
  </script>

</body>
</html>